package com.lcicl.reggie.comment;/*
  Date: 2023/08/05
  Author: Luochao
  Description:
*/

public class test {
    public static void main(String[] args) {
        Solution solution = new Solution();
        char s[]  = {'h','e','l','l','o'};
        solution.reverseString(s);

    }
}

class Solution {
    public void reverseString(char[] s) {
        int min = 0;
        int max = s.length-1;
        while (min <= max) {
            char i = s[max];
            s[max] = s[min];
            s[min] = i;
            max--;
            min++;
        }
        System.out.println(s);

    }
}